package com.ruoyi.yipaiju.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.yipaiju.mapper.InvestigationOrderMapper;
import com.ruoyi.yipaiju.domain.InvestigationOrder;
import com.ruoyi.yipaiju.service.IInvestigationOrderService;

/**
 * fo_investigation_orderService业务层处理
 * 
 * @author liuwp
 * @date 2023-03-01
 */
@Service
public class InvestigationOrderServiceImpl implements IInvestigationOrderService 
{
    @Autowired
    private InvestigationOrderMapper investigationOrderMapper;

    /**
     * 查询fo_investigation_order
     * 
     * @param id fo_investigation_order主键
     * @return fo_investigation_order
     */
    @Override
    public InvestigationOrder selectInvestigationOrderById(Long id)
    {
        return investigationOrderMapper.selectInvestigationOrderById(id);
    }

    /**
     * 查询fo_investigation_order列表
     * 
     * @param investigationOrder fo_investigation_order
     * @return fo_investigation_order
     */
    @Override
    public List<InvestigationOrder> selectInvestigationOrderList(InvestigationOrder investigationOrder)
    {
        return investigationOrderMapper.selectInvestigationOrderList(investigationOrder);
    }
    @Override
    public List<InvestigationOrder> selectInvestigationOrderList1(InvestigationOrder investigationOrder)
    {
        return investigationOrderMapper.selectInvestigationOrderList1(investigationOrder);
    }

    /**
     * 根据业务主键查询一条记录：fo_investigation_order
     *
     * @param investigationOrder fo_investigation_order
     * @return fo_investigation_order
     */
    @Override
    public InvestigationOrder selectOneInvestigationOrder(InvestigationOrder investigationOrder)
    {
        return investigationOrderMapper.selectOneInvestigationOrder(investigationOrder);
    }

    /**
     * 新增fo_investigation_order
     * 
     * @param investigationOrder fo_investigation_order
     * @return 结果
     */
    @Override
    public int insertInvestigationOrder(InvestigationOrder investigationOrder)
    {
        investigationOrder.setCreateTime(DateUtils.getNowDate());
        return investigationOrderMapper.insertInvestigationOrder(investigationOrder);
    }

    /**
     * 修改fo_investigation_order
     * 
     * @param investigationOrder fo_investigation_order
     * @return 结果
     */
    @Override
    public int updateInvestigationOrder(InvestigationOrder investigationOrder)
    {
        investigationOrder.setUpdateTime(DateUtils.getNowDate());
        return investigationOrderMapper.updateInvestigationOrder(investigationOrder);
    }

    @Override
    public int updateInvestigationOrderCondition(InvestigationOrder investigationOrder, InvestigationOrder investigationOrderCondition)
    {
                investigationOrder.setUpdateTime(DateUtils.getNowDate());
        return investigationOrderMapper.updateInvestigationOrderCondition(investigationOrder, investigationOrderCondition);
    }

    /**
     * 批量删除fo_investigation_order
     * 
     * @param ids 需要删除的fo_investigation_order主键
     * @return 结果
     */
    @Override
    public int deleteInvestigationOrderByIds(Long[] ids)
    {
        return investigationOrderMapper.deleteInvestigationOrderByIds(ids);
    }

    /**
     * 删除fo_investigation_order信息
     * 
     * @param id fo_investigation_order主键
     * @return 结果
     */
    @Override
    public int deleteInvestigationOrderById(Long id)
    {
        return investigationOrderMapper.deleteInvestigationOrderById(id);
    }

    /**
     * 条件删除fo_investigation_order
     *
     * @param investigationOrder fo_investigation_order
     * @return 结果
     */
    @Override
    public int deleteInvestigationOrderByCondition(InvestigationOrder investigationOrder)
    {
        return investigationOrderMapper.deleteInvestigationOrderByCondition(investigationOrder);
    }

}
